package co.com.inventarios.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * RequiProId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class RequiProId implements java.io.Serializable {

	// Fields

	private String rqpempresa;
	private String rqpclase;
	private String rqptipo;
	private Double rqpnumero;
	private Double rqpreg;

	// Constructors

	/** default constructor */
	public RequiProId() {
	}

	/** full constructor */
	public RequiProId(String rqpempresa, String rqpclase, String rqptipo,
			Double rqpnumero, Double rqpreg) {
		this.rqpempresa = rqpempresa;
		this.rqpclase = rqpclase;
		this.rqptipo = rqptipo;
		this.rqpnumero = rqpnumero;
		this.rqpreg = rqpreg;
	}

	// Property accessors

	@Column(name = "RQPEMPRESA", unique = false, nullable = false, insertable = true, updatable = true, length = 3)
	public String getRqpempresa() {
		return this.rqpempresa;
	}

	public void setRqpempresa(String rqpempresa) {
		this.rqpempresa = rqpempresa;
	}

	@Column(name = "RQPCLASE", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getRqpclase() {
		return this.rqpclase;
	}

	public void setRqpclase(String rqpclase) {
		this.rqpclase = rqpclase;
	}

	@Column(name = "RQPTIPO", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getRqptipo() {
		return this.rqptipo;
	}

	public void setRqptipo(String rqptipo) {
		this.rqptipo = rqptipo;
	}

	@Column(name = "RQPNUMERO", unique = false, nullable = false, insertable = true, updatable = true, precision = 13, scale = 1)
	public Double getRqpnumero() {
		return this.rqpnumero;
	}

	public void setRqpnumero(Double rqpnumero) {
		this.rqpnumero = rqpnumero;
	}

	@Column(name = "RQPREG", unique = false, nullable = false, insertable = true, updatable = true, precision = 7, scale = 1)
	public Double getRqpreg() {
		return this.rqpreg;
	}

	public void setRqpreg(Double rqpreg) {
		this.rqpreg = rqpreg;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof RequiProId))
			return false;
		RequiProId castOther = (RequiProId) other;

		return ((this.getRqpempresa() == castOther.getRqpempresa()) || (this
				.getRqpempresa() != null
				&& castOther.getRqpempresa() != null && this.getRqpempresa()
				.equals(castOther.getRqpempresa())))
				&& ((this.getRqpclase() == castOther.getRqpclase()) || (this
						.getRqpclase() != null
						&& castOther.getRqpclase() != null && this
						.getRqpclase().equals(castOther.getRqpclase())))
				&& ((this.getRqptipo() == castOther.getRqptipo()) || (this
						.getRqptipo() != null
						&& castOther.getRqptipo() != null && this.getRqptipo()
						.equals(castOther.getRqptipo())))
				&& ((this.getRqpnumero() == castOther.getRqpnumero()) || (this
						.getRqpnumero() != null
						&& castOther.getRqpnumero() != null && this
						.getRqpnumero().equals(castOther.getRqpnumero())))
				&& ((this.getRqpreg() == castOther.getRqpreg()) || (this
						.getRqpreg() != null
						&& castOther.getRqpreg() != null && this.getRqpreg()
						.equals(castOther.getRqpreg())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getRqpempresa() == null ? 0 : this.getRqpempresa()
						.hashCode());
		result = 37 * result
				+ (getRqpclase() == null ? 0 : this.getRqpclase().hashCode());
		result = 37 * result
				+ (getRqptipo() == null ? 0 : this.getRqptipo().hashCode());
		result = 37 * result
				+ (getRqpnumero() == null ? 0 : this.getRqpnumero().hashCode());
		result = 37 * result
				+ (getRqpreg() == null ? 0 : this.getRqpreg().hashCode());
		return result;
	}

}